package com.ruoyi.common.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * @author Ericcc
 * @version v0.01
 * @date 2021/3/19
 */
public class CodeUtils {

    public static final Snowflake snowflake = IdUtil.getSnowflake(1, 1);

    public static long getCode(){
        return snowflake.nextId();
    }
}
